//
//  BLCommentTableViewCell.m
//  家校互通
//
//  Created by 李赛 on 15/5/29.
//  Copyright (c) 2015年 姬鑫宇. All rights reserved.
//

#import "BLCommentTableViewCell.h"

@implementation BLCommentTableViewCell

- (void)awakeFromNib {
    // Initialization code
}
-(void)setTextWithcontentStr:(NSString *)contentStr withCommentName:(NSString *)commentName replyName:(NSString *)replyName
{
    
    NSMutableAttributedString *str=[[NSMutableAttributedString alloc] initWithString:@""];
    if (replyName!=nil) {
        str = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ 回复",replyName]];
        [str addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0,[replyName length])];
    }
    
    NSMutableAttributedString *str1=[[NSMutableAttributedString alloc] initWithString:@""];
    str1 = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@: %@",commentName,contentStr]];
    [str1 addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0,[commentName length])];
    [str appendAttributedString:str1];
    _commentLB.attributedText=str;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
